#ps -Al | grep skynet | cut -c 10-16 | xargs kill -9

root=$(cd "$(dirname "$0")"; pwd)/..
pidfile=$root/logs/${1}.pid
if [ ! -e "${pidfile}" ]
then
    echo 进程未启动!
    exit 0
fi

pid=`cat ${pidfile}`
if [ "$2" != "" ]
then
    kill -$2 $pid
else
    kill -1 $pid
fi
